﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="task_edit.aspx.cs" Inherits="ByteSite.Web.admin.manager.task_edit" ValidateRequest="false" %>
<%@ Import namespace="ByteSite.Common" %>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>编辑任务</title>
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0,user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<link rel="stylesheet" type="text/css" href="../../scripts/artdialog/ui-dialog.css" />

<link rel="stylesheet" type="text/css" href="../skin/default/style.css" />
<link href="../skin/uikit/css/uikit.min.css" rel="stylesheet" />
<script type="text/javascript" src="../skin/uikit/js/uikit.min.js"></script>
<script type="text/javascript" src="../skin/uikit/js/uikit-icons.min.js"></script>
<script type="text/javascript" charset="utf-8" src="../../scripts/jquery/jquery-1.11.2.min.js"></script>
<script type="text/javascript" charset="utf-8" src="../../scripts/jquery/Validform_v5.3.2_min.js"></script>
<script type="text/javascript" src="../../scripts/laydate/laydate.js"></script>
<script type="text/javascript" src="../../scripts/xm-select/xm-select.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/common.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/laymain.js"></script>
<script type="text/javascript">
    $(function () {
        //初始化表单验证
        $("#form1").initValidform();

        $(".url_dl").each(function () {
            $(this).hide();
        })
        if ($("#ddlType").val() == "dll") {
            $(".dll_dl").each(function () {
                $(this).show();
            })
            $(".url_dl").each(function () {
                $(this).hide();
            })
        } else {
            $(".dll_dl").each(function () {
                $(this).hide();
            })
            $(".url_dl").each(function () {
                $(this).show();
            })
        }
        $("#ddlType").change(function () {
            var val = $(this).val();
            if (val === "dll") {
                $(".dll_dl").each(function () {
                    $(this).show();
                })
                $(".url_dl").each(function () {
                    $(this).hide();
                })
            } else if (val === "url") {
                $(".dll_dl").each(function () {
                    $(this).hide();
                })
                $(".url_dl").each(function () {
                    $(this).show();
                })
            }
        })
    });
</script>
</head>

<body class="mainbody">
<form id="form1" runat="server">


<!--内容-->

      <ul uk-tab>
        <li class="uk-active"><a class="" href="javascript:;">任务信息</a></li>
      </ul>


<div class="tab-content">
    
  <dl>
    <dt>任务名称</dt>
    <dd><asp:TextBox ID="txtName" runat="server" CssClass="uk-input" datatype="/^.{1,}$/" sucmsg=" "></asp:TextBox></dd>
  </dl>

  <dl>
    <dt>描述</dt>
    <dd>
      <asp:TextBox ID="txtIntro" runat="server" CssClass="uk-textarea" TextMode="MultiLine" Rows="3" datatype="*0-255" sucmsg=" "></asp:TextBox>
    </dd>
  </dl>
    
  <dl>
    <dt>开始时间</dt>
    <dd>
        <div class="uk-inline">
            <a class="uk-form-icon uk-form-icon-flip" href="#" uk-icon="icon: clock"></a>
            <asp:TextBox ID="txtStartTime" runat="server" autocomplete="off" placeholder="默认为当前时间" CssClass="uk-input uk-form-width-medium uk-input-datetime" date-format="yyyy-MM-dd HH:mm:ss" date-range="false" datatype="/^\s*$|^\d{4}\-\d{1,2}\-\d{1,2}\s{1}(\d{1,2}:){2}\d{1,2}$/" errormsg="请选择正确的日期" sucmsg=" " />
        </div>
    </dd>
  </dl>
  <dl>
    <dt>结束时间</dt>
    <dd>
        <div class="uk-inline">
            <a class="uk-form-icon uk-form-icon-flip" href="#" uk-icon="icon: clock"></a>
            <asp:TextBox ID="txtEndTime" runat="server" autocomplete="off" placeholder="2099-12-31 23:59:59" CssClass="uk-input uk-form-width-medium uk-input-datetime" date-format="yyyy-MM-dd HH:mm:ss" date-range="false" datatype="/^\s*$|^\d{4}\-\d{1,2}\-\d{1,2}\s{1}(\d{1,2}:){2}\d{1,2}$/" errormsg="请选择正确的日期" sucmsg=" " />
        </div>
    </dd>
  </dl>
  <dl>
    <dt>Cron表达式</dt>
    <dd>
        <asp:TextBox ID="txtCron" runat="server" CssClass="uk-input"></asp:TextBox>
        <br />
        <a href="https://cron.qqe2.com/" target="_blank">Cron表达式在线生成</a>
    </dd>
  </dl>

  <dl>
    <dt>任务类型</dt>
    <dd>
      <div class="rule-single-select">
        <asp:DropDownList id="ddlType" runat="server" CssClass="uk-select" datatype="*" errormsg="请选择任务类型" sucmsg=" ">
            <asp:ListItem Value="dll">热加载</asp:ListItem>
            <asp:ListItem Value="url">Url</asp:ListItem>
        </asp:DropDownList>
      </div>
    </dd>
  </dl>
    
  <dl class="dll_dl">
    <dt>命名空间</dt>
    <dd><asp:TextBox ID="txtAssemblyName" runat="server" CssClass="uk-input" sucmsg=" "></asp:TextBox></dd>
  </dl>
  <dl class="dll_dl">
    <dt>方法名称</dt>
    <dd><asp:TextBox ID="txtAssemblyClassName" runat="server" CssClass="uk-input" sucmsg=" "></asp:TextBox></dd>
  </dl>
  <dl class="dll_dl">
    <dt>参数</dt>
    <dd><asp:TextBox ID="txtAssemblyParams" runat="server" CssClass="uk-input" sucmsg=" "></asp:TextBox></dd>
  </dl>
    
    
  <dl class="url_dl">
    <dt>URL</dt>
    <dd><asp:TextBox ID="txtUrl" runat="server" CssClass="uk-input" sucmsg=" "></asp:TextBox></dd>
  </dl>
  <dl class="url_dl">
  <dt>请求类型</dt>
    <dd>
      <div class="rule-single-select">
        <asp:DropDownList id="ddlRequestType" runat="server" CssClass="uk-select" datatype="*" errormsg="请选择请求类型" sucmsg=" ">
            <asp:ListItem Value="GET">GET</asp:ListItem>
            <asp:ListItem Value="POST">POST</asp:ListItem>
            <asp:ListItem Value="PUT">PUT</asp:ListItem>
            <asp:ListItem Value="DELETE">DELETE</asp:ListItem>
        </asp:DropDownList>
      </div>
    </dd>
  </dl>
  <dl class="url_dl">
    <dt>请求头</dt>
    <dd>
      <asp:TextBox ID="txtRequestHeader" runat="server" CssClass="uk-textarea" TextMode="MultiLine" Rows="3" datatype="*0-255" sucmsg=" "></asp:TextBox>
    </dd>
  </dl>
  <dl class="url_dl">
    <dt>请求参数</dt>
    <dd>
      <asp:TextBox ID="txtRequestParams" runat="server" CssClass="uk-textarea" TextMode="MultiLine" Rows="3" datatype="*0-255" sucmsg=" "></asp:TextBox>
    </dd>
  </dl>



  <dl>
    <dt>状态</dt>
    <dd>
      <div class="rule-multi-radio">
        <asp:RadioButtonList ID="rdlStatue" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow">
        <asp:ListItem Value="0" Enabled="false">等待</asp:ListItem>
        <asp:ListItem Value="1">暂停</asp:ListItem>
        <asp:ListItem Value="2">正常/恢复</asp:ListItem>
        <asp:ListItem Value="3" Enabled="false">阻塞</asp:ListItem>
        <asp:ListItem Value="4" Enabled="false">错误</asp:ListItem>
        </asp:RadioButtonList>
      </div>
    </dd>
  </dl>
</div>
<!--/内容-->

<!--工具栏-->
<div class="page-footer">
  <div class="btn-wrap">
    <asp:Button ID="btnSubmit" runat="server" Text="提交保存" CssClass="uk-button uk-button-primary " onclick="btnSubmit_Click" />
    <input name="btnReturn" type="button" value="取消返回" class="uk-button uk-button-default " onclick="javascript:history.back(-1);" />
  </div>
</div>
<!--/工具栏-->

</form>
</body>
</html>
